<template>
<view class="box" v-if="cycledate">
    <view class="box-flex" style="background: #f7f7f7;border-radius: 10rpx;">
        <view class="flex-item" style="text-align: left;">
            <view @tap="handleClick" class="item-content" data-key="left">
                <view class="glyphicon glyphicon-triangle-left">|</view>
            </view>
        </view>
        <view class="flex-item item-content-current-day" style="color:#666;font-size: 24rpx;">{{currentYear}}年{{currentMonth}}月</view>
        <view class="flex-item" style="text-align: right;">
            <view @tap="handleClick" class="item-content" data-key="right">
                <view class="glyphicon glyphicon-triangle-right">|</view>
            </view>
        </view>
    </view>
    <view class="box-flex">
        <view class="flex-item">
            <view class="item-content">一</view>
        </view>
        <view class="flex-item">
            <view class="item-content">二</view>
        </view>
        <view class="flex-item">
            <view class="item-content">三</view>
        </view>
        <view class="flex-item">
            <view class="item-content">四</view>
        </view>
        <view class="flex-item">
            <view class="item-content">五</view>
        </view>
        <view class="flex-item">
            <view class="item-content">六</view>
        </view>
        <view class="flex-item">
            <view class="item-content">日</view>
        </view>
    </view>
    <view class="box-flex">
        <view class="flex-item" v-for="(item, key) in currentDayList" :key="key">
            <view @tap="item.no_optional?'':'selectDay'" :class="'item-content   ' + (item.checked?'checked':'') + ' ' + (item.no_optional?'no-optional':'')" :data-day="item.id" :data-week="item.week" style>{{item.id==0?'':item.id}}</view>
        </view>
    </view>
</view>
</template>
<script>
export default {
	props: {
		currentDayList:{
		type: Object,
		},
		currentYear:{
		type: String,
		},
		currentMonth:{
		type: String,
		},
		cycledate:{
			default:1
		}
	},
	methods:{
		handleClick() {
			this.$emit('tap', {})
		},
	}
}
</script>
<style>
@import "./date.css";
</style>